<?php

add_css('styles/login');
add_css('validationEngine.jquery');
add_js('plugins/validations/languages/jquery.validationEngine-pt_BR', 'footer', 8);
add_js('plugins/validations/jquery.validationEngine');
add_js('plugins/jquery.ajaxCodeigniterFormSubmit', 'footer', 8);
add_js('scripts/user/login_user', 'footer', 12);

if ($message = $this->session->flashdata('error_login')) {

    echo '<div class="display-message-login label label-danger">';
    echo $message;
    echo '</div>';
}
//success_message
if($message = $this->session->flashdata('success_message')) {

    echo '<div class="display-message-login label label-success">';
    echo $message;
    echo '</div>';
}

echo '<div class="box-form-login">';
echo form_open(BASE_URL_USER . '/autentication', 'id="userFormLogin"');
$rdir = false;
if (in_array($this->session->userdata('redirect_after_login'), $this->exceptions_uris) == false) {
                    $rdir = $this->session->userdata('redirect_after_login');
                }
echo form_hidden ('url_redirect',$rdir);
echo add_image('logo-painel-login.png', 'class="login"');
echo '<div class="form-group">';
echo form_label('Login');
echo form_input('login', '', 'class="form-control validate[required]" placeholder="digite seu login" tabindex="1"');
echo '</div>';
echo '<div class="form-group">';
echo form_label('Senha');
echo form_password('password', '', 'class="form-control validate[required]" autocomplete="off" placeholder="Digite a senha" tabindex="2"');
echo '</div>';
echo '<div class="form-group">';
echo form_submit('', 'Acessar', 'class="btn btn-primary" tabindex="3"');
echo anchor('recovery-password.html', ' Esqueceu a senha', 'class="link-reset-password"');
echo '</div>';
echo form_close();
echo anchor(site_url(), 'Voltar ao Site', 'class="btn btn-default btn-lg btn-block"');
echo '<div class="myMessage iMsg"></<div>';
echo '</div>';
?>

